import { createRouter, createWebHistory } from "vue-router";

import HomeView from "../pages/home.vue";
import StarPool from "../pages/star-pool.vue";
import Assets from "../pages/assets.vue";
import Refill from "../pages/refill.vue";
import withDraw from "../pages/withDraw.vue";
import combineCard from "../pages/combineCard.vue";
import myBag from "../pages/myBag.vue";
import myAdd from "../pages/myAdd.vue";
import assetsDetail from "../pages/assetsDetail.vue";
import myTeam from "../pages/myTeam.vue";
import trade from "../pages/trade.vue";
import cardDetail from "../pages/cardDetail.vue";
import cardSell from "../pages/cardSellDetail.vue";
import myRealse from "../pages/myRealse.vue";
import myMeal from "../pages/myMealCard.vue";
import userMenu from "../pages/myMenu.vue";
import setPassword from "../pages/setPassword.vue";
import setEmail from "../pages/setEmail.vue";

const routes = [
  { path: "/", component: HomeView },
  { path: "/starPool", component: StarPool },
  { path: "/assets", component: Assets },
  { path: "/refill", component: Refill },
  { path: "/withDraw", component: withDraw },
  { path: "/combineCard", component: combineCard },
  { path: "/myBag", component: myBag },
  { path: "/myAdd", component: myAdd },
  { path: "/assetsDetail", component: assetsDetail },
  { path: "/myTeam", component: myTeam },
  { path: "/trade", component: trade },
  { path: "/cardDetail", component: cardDetail },
  { path: "/cardSell", component: cardSell },
  { path: "/myRealse", component: myRealse },
  { path: "/myMealCard", component: myMeal },
  { path: "/userMenu", component: userMenu },
  { path: "/setPassword", component: setPassword },
  { path: "/setEmail", component: setEmail },
];

export const router = createRouter({
  history: createWebHistory(),
  routes,
  scrollBehavior(to, from, savedPosition) {
    return { top: 0 };
  },
});
